from functools import partial


def spam(a, b, c, d):
    print(a, b, c, d)


s1 = partial(spam, 1)
print(s1(4, 2, 3))
s2 = partial(spam, 1, 2, d=24)  # a=1 b=2 d=24
print(s2(3))  # c=3
